Evan Celaya
Racquel Fygenson
4/22/18
Is the amount of crimes at one's school in New York City correlated with the student's scores on the State Mathematics Exam?
Source: Local NYC Government: https://catalog.data.gov/dataset/new-york-state-mathematics-exam-by-school https://catalog.data.gov/dataset/school-safety-report-8067a
Math Exam Scores
School Safety
Safety data set was full of “N/A” and “# N/A” wherever there were schools that shared a location. It looked a little like this:
Next, we separated the table into 2 dataframes: consolidated locations (yellow) and school names (purple). Then we separated the data frames by year (2014, and 2015).
Next we joined the consolidated data for 2014 (yellow) with the correct school names for 2014 (purple), and did the same for 2015 (yellow & purple) to look like this:
Next we had to copy over the consolidated data’s (yellow) crime rates to the individual school names it correlated with (purple) to look like this:
Then, we used rbind to connect the the 2014 and 2015 years back together, deleting duplicate rows
In total, we reduced the dimensions of the Safety data set to 3565 observations of 29 variables, and the dimensions of the Math data set to 2250 observations of 10 variables, merging the two data sets to have a final date frame of 2250 observations of 42 variables. We use this dataset for our data analysis and graphing. Below is a quick view of the first 6 variables and 6 observations.
X DBN School.Name Year NumTested MeanScaleScore
1 1 01M015 P.S. 015 ROBERTO CLEMENTE 2014 63 278
2 2 01M019 P.S. 019 ASHER LEVY 2014 104 308
3 3 01M020 P.S. 020 ANNA SILVER 2014 233 298
4 4 01M034 P.S. 034 FRANKLIN D. ROOSEVELT 2014 264 298
5 5 01M063 THE STAR ACADEMY - P.S.63 2014 53 301
6 6 01M064 P.S. 064 ROBERT SIMON 2014 113 294
Overall, the amount of crimes at a school in New York City affected the scores students recieved on the state Mathematics Exam. Through visual analysis and regression modeling, there is a distinct difference between schools with fewer than 3 crimes and schools with more when predicting the mean score on the math exam.